package leetcode;

import java.util.HashMap;
import java.util.Map;
import java.util.Stack;

/**
 * Leetcode227【基本计算器 II】
 * https://leetcode-cn.com/problems/basic-calculator-ii/
 */
public class BasicCalculatorTwo {
    public int calculate(String s) {
        Map<Character , Integer> map = new HashMap<>();
        map.put('+' , 1);
        map.put('-' , 1);
        map.put('*' , 2);
        map.put('/' , 2);
        Stack<Integer> stack1 = new Stack<>();
        Stack<Character> stack2 = new Stack<>();
        for (int i = 0; i < s.length(); i++) {
            if (Character.isDigit(s.charAt(i))){
                stack1.push((int)s.charAt(i));
            }else {
                if (map.get(s.charAt(i)) > 1){
                    ;
                }else {
//                    stack2.push((s.charAt(i));
                }
            }
        }
        while (!stack2.isEmpty()){

        }
        return stack1.pop();
    }
}
